import matplotlib.pyplot as plt
import numpy as np

plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False


data = np.random.rand(10, 10)


plt.figure(figsize=(10, 10))
plt.imshow(data, interpolation="gaussian")

plt.title('热力图示例')
plt.colorbar(label='颜色调')
plt.grid(True, linestyle='--', alpha=0.5)
plt.ylabel('Y轴')
plt.xlabel('X轴')
plt.xticks(np.arange(10))
plt.yticks(np.arange(10))
plt.show()